# -*- coding: utf-8 -*-

# 服务器配置项
from dataclasses import dataclass, field


@dataclass
class XHJProductionConfig:
    # 小火箭正式环境配置
    hostname = "xxxxx"
    port = 22
    username = "xx"
    password = "xxxx"

    backend_folder = "/root/yudeshui/Jss/JssAPI"
    backend_command = [f"cd {backend_folder}", "git pull", "systemctl restart xhj.service"]

    frontend_folder = "/root/yudeshui/Jss/JssWeb"
    frontend_command = [f"cd {frontend_folder}", "git pull"]


@dataclass
class XHJTestingConfig:
    # 小火箭测试环境配置
    hostname = "xxxxx"
    port = 22
    username = "xx"
    password = "xxxx"

    backend_folder = "/root/shihe/test_web/xhj/JssAPI"
    backend_command = [f"cd {backend_folder}", "git pull", "systemctl restart xhj.service"]

    frontend_folder = "/root/shihe/test_web/xhj/JssWeb"
    frontend_command = [f"cd {frontend_folder}", "git pull"]


class InitConfig:
    config = None


CONFIG_INFO_DICT = {
    "xhj": "小火箭",
    "dzg": "大掌柜",
    "testing": "测试",
    "production": "正式",
    "backend": "后端",
    "frontend": "前端"
}



